<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta charset="UTF-8">
    <title>微信授权登录</title>

    <link rel="stylesheet" href="../css/jquery-weui.css" />
    <link href="../css/bootstrap.min.css" rel="stylesheet" />
    <script src="../js/jquery-2.0.3.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../css/iconfont.css" />
</head>
<body>
<div class="row text-center">
    <div class="col-sm-6 col-sm-offset-3 social-login">
        <h5>请微信授权登录...</h5>
        <div class="social-login-buttons">
            <a class="btn btn-link-2 weixin" id="wxlogin" href="#" style="width: 50px;height: 50px;">
                <i class="icon iconfont icon-weixin" style="font-size: 35px;"></i>
            </a>
        </div>
    </div>
</div>
</body>
<style>
    .social-login{ margin-top: 15em;}
    .social-login-buttons{margin-top: 2em;}
</style>
<script type="text/javascript">
    $(function(){
        var url = window.location.host;

        $.ajax({
            type : "GET",
            url :"http://"+ url+"/shop_util/admin/wxlogin",
            dataType : "json",
            success : function(data) {
                if (data.success) {
                    $('#wxlogin').attr('href',  data.url);
                }
            }
        });

    });

</script>
</html>